<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + 	request.getServerPort() + request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
<meta charset="UTF-8">

<link href="jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="jquery/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="jquery/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="jquery/bootstrap-datetimepicker-master/locale/bootstrap-datetimepicker.zh-CN.js"></script>
	<link rel="stylesheet" type="text/css" href="jquery/bs_pagination/jquery.bs_pagination.min.css">
	<script type="text/javascript" src="jquery/bs_pagination/jquery.bs_pagination.min.js"></script>
	<script type="text/javascript" src="jquery/bs_pagination/en.js"></script>


<script type="text/javascript">

	$(function(){

//为创建按钮绑定事件，用于打开添加线索的模态窗口
		$("#addBtn").click(function () {
			$(".time").datetimepicker({
				minView: "month",
				language:  'zh-CN',
				format: 'yyyy-mm-dd',
				autoclose: true,
				todayBtn: true,
				pickerPosition: "top-left"
			});
			//alert("创建按钮绑定成功")
			$.ajax({
				url:"/crm/clue/getUserList.do",
				type:"get",
				data:{

				},
				dataType:"json",
				success:function (resp) {
					//alert(resp.userlist)
					var html="<option></option>";
					$.each(resp.userlist,function (i,n) {
						//html+="<option value='"  +n.id+   "'>'"  +n.name+   "'</option>";
						html+="<option value='"+n.id+"'>"+n.name+"</option>";
					})

					$("#create-clueOwner").html(html)//给所有者下拉框铺值

					var currentUser="${user.id}"
					//alert(currentUser)

					$("#create-clueOwner").val(currentUser)//将下拉列表的默认值设为当前登录用户

					$("#createClueModal").modal("show")

				}
			})


		})
		
//为保存按钮绑定事件，执行线索创建操作
		$("#saveBtn").click(function () {
			//alert($.trim($("#create-state").val()))


			//alert("事件绑定成功")
			$.ajax({
				url:"/crm/clue/saveClue.do",
				type:"post",
				data: {
					"fullname":$.trim($("#create-fullname").val()),
					"appellation":$.trim($("#create-appellation").val()),
					"owner":$.trim($("#create-clueOwner").val()),
					"company":$.trim($("#create-company").val()),
					"job":$.trim($("#create-job").val()),
					"email":$.trim($("#create-email").val()),
					"phone":$.trim($("#create-phone").val()),
					"website":$.trim($("#create-website").val()),
					"mphone":$.trim($("#create-mphone").val()),
					"state":$.trim($("#create-state").val()),
					"source":$.trim($("#create-source").val()),
					"description":$.trim($("#create-description").val()),
					"contactSummary":$.trim($("#create-contactSummary").val()),
					"nextContactTime":$.trim($("#create-nextContactTime").val()),
					"address":$.trim($("#create-address").val())
				},
				dataType: "json",
				success:function (resp) {
				if(resp){
					alert("创建线索成功")
					//刷新列表
					pageList(1,8)


					$("#createClueModal").modal("hide")
				}else {
					alert("创建线索失败")
				}

				}
			})
		})


//给查询按钮绑定事件，执行线索查询操作
		$("#queryBtn").click(function () {
			//alert("事件绑定成功")

			//将查询框的值赋到隐藏域中
			$("#hidden-fullname").val($.trim($("#query-fullname").val()))
			$("#hidden-company").val($.trim($("#query-company").val()))
			$("#hidden-phone").val($.trim($("#query-phone").val()))
			$("#hidden-source").val($.trim($("#query-source").val()))
			$("#hidden-owner").val($.trim($("#query-owner").val()))
			$("#hidden-mphone").val($.trim($("#query-mphone").val()))
			$("#hidden-clueState").val($.trim($("#query-clueState").val()))

			pageList(1,8)

		})

//页面加载完毕，执行分页查询，显示出线索列表
		pageList(1,8)

//复选框全选操作
		//这是通过全选框控制其他复选框
		$("#qx").click(function () {
			$("input[name=xz]").prop("checked",this.checked)
		})

		//这是通过复选框控制全选框
		$("#create-clueList").on("click",$("input[name=xz]"),function () {
			$("#qx").prop("checked",($("input[name=xz]:checked").length==$("input[name=xz]").length))
		})

//给修改按钮绑定事件，打开线索修改的模态窗口
        $("#editBtn").click(function () {
            //alert("事件绑定成功")
			$(".time").datetimepicker({
				minView: "month",
				language:  'zh-CN',
				format: 'yyyy-mm-dd',
				autoclose: true,
				todayBtn: true,
				pickerPosition: "top-left"
			});

            var $xz=$("input[name=xz]:checked");

            if($xz.length==0){
                alert("请选择你需要修改的线索")
            }else if($xz.length>1){
                alert("一次最多只能修改一条线索哦")
            }else {

                var id=$xz.val()
                //alert("你选择的是"+id)

				$("#edit-id").val(id)//将要修改的线索的id放入到隐藏域中

                $.ajax({
                    url:"/crm/clue/editClue.do",
                    type:"post",
                    data:{
                        "id":id
                    },
                    dataType:"json",
                    success:function (resp) {
			/*
			resp
				:[{"clue",{线索对象}},{"userList",{用户列表}}]
			 */

						var html="<option></option>";

					$.each(resp.userList,function (i,n) {//拼接所有者下拉列表
						html+='<option value="'+n.id+'">'+n.name+'</option>'

					})


						$("#edit-owner").html(html)//铺垫所有者下拉列表


						alert(resp.clue.owner)
					//开始铺垫修改线索模态窗口
						$("#edit-owner").val(resp.clue.owner)
						$("#edit-call").val(resp.clue.appellation)
						$("#edit-fullname").val(resp.clue.fullname)
						$("#edit-company").val(resp.clue.company)
						$("#edit-email").val(resp.clue.email)
						$("#edit-job").val(resp.clue.job)
						$("#edit-phone").val(resp.clue.phone)
						$("#edit-mphone").val(resp.clue.mphone)
						$("#edit-source").val(resp.clue.source)
						$("#edit-state").val(resp.clue.state)
						$("#edit-description").val(resp.clue.description)
						$("#edit-nextContactTime").val(resp.clue.nextContactTime)
						$("#edit-contactSummary").val(resp.clue.contactSummary)
						$("#edit-address").val(resp.clue.address)

						$("#editClueModal").modal("show")

					}
                })


            }

        })

//给更新按钮绑定事件，执行线索的修改操作
		$("#updateBtn").click(function () {
				//alert("事件绑定成功")
				var id=$("#edit-id").val()
				//alert("需要修改的线索的id"+id)
                $.ajax({
                    url:"/crm/clue/updateClue.do",
                    type:"post",
                    data:{
                        "id":id,
                        "owner":$.trim($("#edit-owner").val()),
                        "appellation":$.trim($("#edit-call").val()),
                        "fullname":$.trim($("#edit-fullname").val()),
                        "company":$.trim($("#edit-company").val()),
                        "email":$.trim($("#edit-email").val()),
                        "job":$.trim($("#edit-job").val()),
                        "phone":$.trim($("#edit-phone").val()),
                        "mphone":$.trim($("#edit-mphone").val()),
                        "source":$.trim($("#edit-source").val()),
                        "state":$.trim($("#edit-state").val()),
                        "description":$.trim($("#edit-description").val()),
                        "nextContactTime":$.trim($("#edit-nextContactTime").val()),
                        "contactSummary":$.trim($("#edit-contactSummary").val()),
                        "address":$.trim($("#edit-address").val()),
                        "website":$.trim($("#edit-website").val()),

                    },
                    dataType:"json",

                    success:function (resp) {
            /*
                resp
                    {"success,true/false"}
             */

						if(resp.success){
							alert("修改线索成功")
							pageList(1,8)
							$("#editClueModal").modal("hide")
						}else {
							alert("修改线索失败")
						}
                    }
                })



		})



//给删除按钮绑定事件，执行线索的删除操作
		$("#deleteBtn").click(function () {
			//alert("事件绑定成功")
			/*if(confirm("确定要删除此条线索吗")){

			}
			*/

			var $xz=$("input[name=xz]:checked")
			if($xz.length==0){
				alert("请选择你需要删除的线索")
			}else {

				if(confirm("确定要删除所选的线索吗？")){

					var parameter="";

					for(var i=0;i<$xz.length;i++){

						parameter+="id="+$($xz[i]).val()

						if(i<$xz.length-1){
							parameter+="&"
						}

					}


					//发起ajax请求，通过线索id来删除线索 【批量删除】
					$.ajax({
						url:"/crm/clue/deleteClue.do",
						type:"post",
						data:parameter,
						dataType:"json",
						success:function (resp) {
				/*
					resp:
						{"success",true/falese}

				 */
					if (resp.success){
						alert("删除线索成功奥")
						pageList(1,8)//分页查询刷新列表

					}else {
						alert("删除线索失败，清从新操作")

					}
						}


					})
				}



			}

		})

	});



//页面加载完毕分割线=========================================================================================

	//pageList方法
	function pageList(pageNo,pageSize) {

	//将隐藏域中的数值赋给查询框
		$("#query-fullname").val($.trim($("#hidden-fullname").val()))
		$("#query-company").val($.trim($("#hidden-company").val()))
		$("#query-phone").val($.trim($("#hidden-phone").val()))
		$("#query-source").val($.trim($("#hidden-source").val()))
		$("#query-owner").val($.trim($("#hidden-owner").val()))
		$("#query-mphone").val($.trim($("#hidden-mphone").val()))
		$("#query-clueState").val($.trim($("#hidden-clueState").val()))
		$.ajax({
			url:"/crm/clue/pageList.do",
			type:"get",
			dataType:"json",
			data:{
				"pageNo":pageNo,
				"pageSize":pageSize,
				"fullname":$("#query-fullname").val(),
				"company":$("#query-company").val(),
				"phone":$("#query-phone").val(),
				"source":$("#query-source").val(),
				"owner":$("#query-owner").val(),
				"mphone":$("#query-mphone").val(),
				"state":$("#query-clueState").val()
			},
			success:function (resp) {
				var html="";
				//alert(resp.total)
				$.each(resp.datalist,function (i,n) {
						html+='	<tr class="active">'
                        html+=' <td><input type="checkbox" name="xz" value="'+n.id+'"/></td>'
                        html+=' <td><a style="text-decoration: none; cursor: pointer;" onclick="window.location.href=\'/crm/clue/clueDetail.do?id='+n.id+'\';">'+n.fullname+'</a></td>'
                        html+=' <td>'+n.company+'</td>'
                        html+=' <td>'+n.phone+'</td>'
                        html+=' <td>'+n.mphone+'</td>'
                        html+=' <td>'+n.source+'</td>'
                        html+=' <td>'+n.owner+'</td>'
                        html+=' <td>'+n.state+'</td>'
                       	html+='	</tr>'
				})

				$("#create-clueList").html(html)
				//计算总页数
				var totalPages=resp.total%pageSize==0?resp.total:parseInt(resp.total/pageSize)+1;


				//处理完数据后，加入分页插件
				$("#activityPage").bs_pagination({
					currentPage: pageNo, // 页码
					rowsPerPage: pageSize, // 每页显示的记录条数
					maxRowsPerPage: 20, // 每页最多显示的记录条数
					totalPages: totalPages, // 总页数
					totalRows: resp.total, // 总记录条数

					visiblePageLinks: 3, // 显示几个卡片

					showGoToPage: true,
					showRowsPerPage: true,
					showRowsInfo: true,
					showRowsDefaultInfo: true,

					onChangePage : function(event, data){
						pageList(data.currentPage , data.rowsPerPage);
					}
				});

			}
		})

	}

</script>
</head>
<body>

	<!-- 创建线索的模态窗口 -->
	<div class="modal fade" id="createClueModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 90%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">创建线索</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">

						<div class="form-group">
							<label for="create-clueOwner" class="col-sm-2 control-label">所有者<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-clueOwner">

								</select>
							</div>
							<label for="create-company" class="col-sm-2 control-label">公司asx<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-company">
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-call" class="col-sm-2 control-label">称呼</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-appellation">
								  <option></option>
								  <c:forEach items="${applicationScope.appellation}" var="a">
									  <option value="${a.value}">${a.text}</option>
								  </c:forEach>
								</select>
							</div>
							<label for="create-surname" class="col-sm-2 control-label">姓名<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-fullname">
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-job" class="col-sm-2 control-label">职位</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-job">
							</div>
							<label for="create-email" class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-email">
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-phone" class="col-sm-2 control-label">公司座机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-phone">
							</div>
							<label for="create-website" class="col-sm-2 control-label">公司网站</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-website">
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-mphone" class="col-sm-2 control-label">手机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="create-mphone">
							</div>
							<label for="create-status" class="col-sm-2 control-label">线索状态</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-state">
								  <option></option>
								  <c:forEach items="${applicationScope.clueState}" var="c" >
									  <option value="${c.value}">${c.text}</option>
								  </c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="create-source" class="col-sm-2 control-label">线索来源</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="create-source">
								  <option></option>
								 <c:forEach items="${applicationScope.source}" var="s">
									 <option value="${s.value}">${s.text}</option>
								 </c:forEach>
								</select>
							</div>
						</div>
						

						<div class="form-group">
							<label for="create-describe" class="col-sm-2 control-label">线索描述</label>
							<div class="col-sm-10" style="width: 81%;">
								<textarea class="form-control" rows="3" id="create-description"></textarea>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative;"></div>
						
						<div style="position: relative;top: 15px;">
							<div class="form-group">
								<label for="create-contactSummary" class="col-sm-2 control-label">联系纪要</label>
								<div class="col-sm-10" style="width: 81%;">
									<textarea class="form-control" rows="3" id="create-contactSummary"></textarea>
								</div>
							</div>
							<div class="form-group">
								<label for="create-nextContactTime" class="col-sm-2 control-label">下次联系时间</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control time" id="create-nextContactTime" readonly>
								</div>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative; top : 10px;"></div>
						
						<div style="position: relative;top: 20px;">
							<div class="form-group">
                                <label for="create-address" class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="1" id="create-address"></textarea>
                                </div>
							</div>
						</div>
					</form>
					
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="saveBtn">保存</button>
				</div>
			</div>
		</div>
	</div>
	
	<!-- 修改线索的模态窗口 -->
	<div class="modal fade" id="editClueModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 90%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title">修改线索</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">
						<input type="hidden" id="edit-id">
					
						<div class="form-group">
							<label for="edit-clueOwner" class="col-sm-2 control-label">所有者啊啊啊<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-owner" >
								  <%--<option>zhangsan</option>
								  <option>lisi</option>
								  <option>wangwu</option>--%>
								</select>
							</div>
							<label for="edit-company" class="col-sm-2 control-label">公司<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-company" value="动力节点">
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-call" class="col-sm-2 control-label">称呼</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-call">
								  <option></option>
								  <c:forEach items="${applicationScope.appellation}" var="a">
                                        <option value="${a.value}">${a.text}</option>
                                  </c:forEach>
								</select>
							</div>
							<label for="edit-surname" class="col-sm-2 control-label">姓名<span style="font-size: 15px; color: red;">*</span></label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-fullname" value="李四">
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-job" class="col-sm-2 control-label">职位</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-job" value="CTO">
							</div>
							<label for="edit-email" class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-email" value="lisi@bjpowernode.com">
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-phone" class="col-sm-2 control-label">公司座机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-phone" value="010-84846003">
							</div>
							<label for="edit-website" class="col-sm-2 control-label">公司网站</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-website" value="http://www.bjpowernode.com">
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-mphone" class="col-sm-2 control-label">手机</label>
							<div class="col-sm-10" style="width: 300px;">
								<input type="text" class="form-control" id="edit-mphone" value="12345678901">
							</div>
							<label for="edit-status" class="col-sm-2 control-label">线索状态</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-state">
								  <option></option>
								  <c:forEach items="${applicationScope.clueState}" var="s">
                                      <option value="${s.value}">${s.text}</option>
                                  </c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-source" class="col-sm-2 control-label">线索来源</label>
							<div class="col-sm-10" style="width: 300px;">
								<select class="form-control" id="edit-source">
								  <option></option>
								  <c:forEach items="${applicationScope.source}" var="s">
                                       <option value="${s.value}">${s.text}</option>
                                  </c:forEach>
								</select>
							</div>
						</div>
						
						<div class="form-group">
							<label for="edit-describe" class="col-sm-2 control-label">描述</label>
							<div class="col-sm-10" style="width: 81%;">
								<textarea class="form-control" rows="3" id="edit-description">这是一条线索的描述信息</textarea>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative;"></div>
						
						<div style="position: relative;top: 15px;">
							<div class="form-group">
								<label for="edit-contactSummary" class="col-sm-2 control-label">联系纪要</label>
								<div class="col-sm-10" style="width: 81%;">
									<textarea class="form-control" rows="3" id="edit-contactSummary">这个线索即将被转换</textarea>
								</div>
							</div>
							<div class="form-group">
								<label for="edit-nextContactTime" class="col-sm-2 control-label">下次联系时间</label>
								<div class="col-sm-10" style="width: 300px;">
									<input type="text" class="form-control time" id="edit-nextContactTime" readonly>
								</div>
							</div>
						</div>
						
						<div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative; top : 10px;"></div>

                        <div style="position: relative;top: 20px;">
                            <div class="form-group">
                                <label for="edit-address" class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="1" id="edit-address">北京大兴区大族企业湾</textarea>
                                </div>
                            </div>
                        </div>
					</form>
					
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="updateBtn">更新</button>
				</div>
			</div>
		</div>
	</div>
	
	
	
	
	<div>
		<div style="position: relative; left: 10px; top: -10px;">
			<div class="page-header">
				<h3>线索列表ddw</h3>
			</div>
		</div>
	</div>
	
	<div style="position: relative; top: -20px; left: 0px; width: 100%; height: 100%;">
	
		<div style="width: 100%; position: absolute;top: 5px; left: 10px;">
<%--查询模块--%>
			<div class="btn-toolbar" role="toolbar" style="height: 80px;">
				<input type="hidden" id="hidden-fullname">
				<input type="hidden" id="hidden-company">
				<input type="hidden" id="hidden-phone">
				<input type="hidden" id="hidden-source">
				<input type="hidden" id="hidden-owner">
				<input type="hidden" id="hidden-mphone">
				<input type="hidden" id="hidden-clueState">
				<form class="form-inline" role="form" style="position: relative;top: 8%; left: 5px;">
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">名称w</div>
				      <input class="form-control" type="text" id="query-fullname">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">公司</div>
				      <input class="form-control" type="text" id="query-company">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">公司座机</div>
				      <input class="form-control" type="text" id="query-phone">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">线索来源qqq</div>
					  <select class="form-control" id="query-source">
					  	  <option></option>
					  	  <c:forEach items="${applicationScope.source}" var="s">
							  <option ${s.id}>${s.text}</option>
						  </c:forEach>

					  </select>
				    </div>
				  </div>
				  
				  <br>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">所有者aa</div>
				      <input class="form-control" type="text" id="query-owner">
				    </div>
				  </div>
				  
				  
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">手机</div>
				      <input class="form-control" type="text" id="query-mphone">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <div class="input-group">
				      <div class="input-group-addon">线索状态</div>
					  <select class="form-control" id="query-clueState">
					  	<option></option>
					  	<c:forEach items="${applicationScope.clueState}" var="c">
							<option ${c.id}>${c.text}</option>
						</c:forEach>
					  </select>
				    </div>
				  </div>

				  <button type="button" class="btn btn-default" id="queryBtn" >查询sh</button>
				  
				</form>
			</div>
			<div class="btn-toolbar" role="toolbar" style="background-color: #F7F7F7; height: 50px; position: relative;top: 40px;">
				<div class="btn-group" style="position: relative; top: 18%;">
				  <button type="button" class="btn btn-primary" data-toggle="modal" id="addBtn"><span class="glyphicon glyphicon-plus"></span> 创建</button>
				  <button type="button" class="btn btn-default" data-toggle="modal" id="editBtn"><span class="glyphicon glyphicon-pencil"></span> 修改sas</button>
				  <button type="button" class="btn btn-danger" id="deleteBtn"><span class="glyphicon glyphicon-minus"></span> 删除</button>
				</div>
				
				
			</div>
			<div style="position: relative;top: 50px;">
				<table class="table table-hover">
					<thead>
						<tr style="color: #B3B3B3;">
							<td><input type="checkbox" id="qx" /></td>
							<td>名称a</td>
							<td>公司</td>
							<td>公司座机</td>
							<td>手机</td>
							<td>线索来源</td>
							<td>所有者wwgg</td>
							<td>线索状态</td>
						</tr>
					</thead>
					<tbody id="create-clueList">
						<%--<tr>
							<td><input type="checkbox" /></td>
							<td><a style="text-decoration: none; cursor: pointer;" onclick="window.location.href='workbench/clue/detail.jsp';">李四先生</a></td>
							<td>动力节点asas</td>
							<td>010-84846003</td>
							<td>12345678901</td>
							<td>广告</td>
							<td>zhangsan</td>
							<td>已联系</td>
						</tr>--%>

					</tbody>
				</table>
			</div>


			<div style="height: 50px; position: relative;top: 30px;">
				<div id="activityPage"></div>

			</div>
			
		</div>
		
	</div>
</body>
</html>